<%-- 
    Document   : addRestaurant
    Created on : Dec 4, 2013, 5:18:50 PM
    Author     : lnngu_000
--%>


<%@taglib prefix="s" uri="/struts-tags" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
    <head>
        <title>Catering.com</title>
        <meta charset="utf-8">
        <%@include file="head.jsp" %>
    </head>
    <body id="page1">
        <!--==============================header=================================-->
        <header>
            <%@include file="menuTop.jsp" %>

        </header>
        <!--==============================content================================-->
        <section id="content">
            <div class="main">

                <div class="wrapper">
                    <article class="column-1" style="border: 1px solid #bbb;border-radius: 3px;background: #fbba35;">
                        <div class="indent-left">
                            <div class="maxheight indent-bot">
                                <%@include file="menuAdminCaterer.jsp" %>
                            </div>

                    </article>
                    <article class="column-2">
                        <div>
                            <s:form action="addRestaurant" theme="simple"  method="POST" enctype="multipart/form-data">
                                <table style="width: 100%; text-align: center;margin-top: 10px;">
                                    <caption style="margin-bottom: 40px;font-size: 20px;">Information Restaurant</caption>
                                    <tr style="height: 50px;">
                                        <td style="width: 20%;text-align: right;">
                                            Restaurant Name
                                        </td>
                                        <td style="width: 70%;text-align: left; padding-left: 10px;">
                                            <s:textfield  cssClass="txtBox"  name="name" cssStyle="width: 300px;"></s:textfield>

                                            </td>
                                        </tr>
                                        <tr style="height: 50px;">
                                            <td style="width: 20%;text-align: right;">
                                                Images
                                            </td>
                                            <td style="width: 70%;text-align: left; padding-left: 10px;">
                                                <img id="previewHolder"  width="220px" height="190px" src="images/customer/NoImage.jpg"/>
                                            <s:file style="width: 300px;" name="images" id="filePhoto"></s:file>

                                            </td>
                                        </tr>
                                        <tr style="height: 50px;">
                                            <td style="width: 20%;text-align: right;">
                                                Address
                                            </td>
                                            <td style="width: 70%;text-align: left; padding-left: 10px;">
                                            <s:textfield  cssClass="txtBox"  name="address" cssStyle="width: 300px;"></s:textfield>

                                            </td>
                                        </tr>
                                        <tr style="height: 50px;">
                                            <td style="width: 20%;text-align: right;">
                                                Type Of Menu
                                            </td>
                                            <td style="width: 70%;text-align: left; padding-left: 10px;">
                                            <s:select 
                                                list="#{'Vegetarian':'Vegetarian', 'Non-Veg':'Non-Veg'}" 
                                                name="typeOfMenu" 
                                                cssStyle="width:310px;height:30px;font-size: 14px;font-weight: bold;"
                                                value="'Vegetarian'" />

                                        </td>
                                    </tr>
                                    <tr style="height: 50px;">
                                        <td style="width: 20%;text-align: right;">
                                            Regional
                                        </td>
                                        <td style="width: 70%;text-align: left; padding-left: 10px;">
                                            <s:select 
                                                id="Regional"
                                                onchange="getcbChild();"
                                                list="#{'South':'South', 'North':'North'}" 
                                                name="regional" 
                                                cssStyle="width:310px;height:30px;font-size: 14px;font-weight: bold;"
                                                value="'South'" />

                                        </td>
                                    </tr>
                                    <tr style="height: 50px;">
                                        <td style="width: 20%;text-align: right;">
                                            Provinces
                                        </td>
                                        <td style="width: 70%;text-align: left; padding-left: 10px;">
                                            <s:select 
                                                id="Provinces"
                                                onchange="getcbChild1();"
                                                list="#{'test':'test'}"
                                                name="provinces" 
                                                cssStyle="width:310px;height:30px;font-size: 14px;font-weight: bold;"
                                                />

                                        </td>
                                    </tr>
                                    <tr style="height: 50px;">
                                        <td style="width: 20%;text-align: right;">
                                            Location
                                        </td>
                                        <td style="width: 70%;text-align: left; padding-left: 10px;">
                                            <s:select 
                                                id="Location"
                                                list="#{'test':'test'}"
                                                name="location" 
                                                cssStyle="width:310px;height:30px;font-size: 14px;font-weight: bold;"
                                                />

                                        </td>
                                    </tr>
                                    <tr style="height: 50px;">
                                        <td style="width: 20%;text-align: right;">
                                            Number of plates
                                        </td>
                                        <td style="width: 70%;text-align: left; padding-left: 10px;">
                                            <s:select 

                                                list="#{'100':'50 to 100',
                                                        '150':'100 to 150',
                                                        '200':'150 to 200',
                                                        '250':'200 to 250',
                                                        '300':'250 to 300',
                                                        '350':'300 to 350',
                                                        '400':'350 to 400',
                                                        '450':'400 to 450',
                                                        '500':'450 to 500',
                                                        '550':'500 to 550',
                                                        '600':'550 to 600',
                                                        '650':'600 to 650',
                                                        '700':'650 to 700',
                                                        '750':'700 to 750',
                                                        '800':'750 to 800',
                                                        '850':'800 to 850',
                                                        '900':'850 to 900',
                                                        '950':'900 to 950',
                                                        '1000':'950 to 1000',
                                                        '1050':'1000 above'
                                                }"
                                                name="numberOfPlates" 
                                                cssStyle="width:310px;height:30px;font-size: 14px;font-weight: bold;"
                                                />

                                        </td>
                                    </tr>
                                    <tr style="height: 50px;">
                                        <td style="width: 20%;text-align: right;">
                                            Experience
                                        </td>
                                        <td style="width: 70%;text-align: left; padding-left: 10px;">
                                            <s:select 
                                                list="#{'1':'1 Year','2':'2 Year','3':'3 Year','4':'4 Year','5':'5 Year','6':'6 above'}"
                                                name="experience" 
                                                cssStyle="width:310px;height:30px;font-size: 14px;font-weight: bold;"
                                                />

                                        </td>
                                    </tr>
                                    <tr style="height: 50px;">
                                        <td style="width: 20%;text-align: right;">
                                            Dish
                                        </td>
                                        <td style="width: 70%;text-align: left; padding-left: 10px;">
                                            <s:textfield  cssClass="txtBox"  name="dish" cssStyle="width: 300px;"></s:textfield>

                                            </td>
                                        </tr>
                                        <tr style="height: 50px;">
                                            <td style="width: 20%;text-align: right;">
                                                Open Time
                                            </td>
                                            <td style="width: 70%;text-align: left; padding-left: 10px;">
                                            <s:select 
                                                list="#{'1 AM':'1 AM',
                                                        '2 AM':'2 AM',
                                                        '3 AM':'3 AM',
                                                        '4 AM':'4 AM',
                                                        '5 AM':'5 AM',
                                                        '6 AM':'6 AM',
                                                        '7 AM':'7 AM',
                                                        '8 AM':'8 AM',
                                                        '9 AM':'9 AM',
                                                        '10 AM':'10 AM',
                                                        '11 AM':'11 AM',
                                                        '12 AM':'12 AM',
                                                        '13 PM':'1 PM',
                                                        '14 PM':'2 PM',
                                                        '15 PM':'3 PM',
                                                        '16 PM':'4 PM',
                                                        '17 PM':'5 PM',
                                                        '18 PM':'6 PM',
                                                        '19 PM':'7 PM',
                                                        '20 PM':'8 PM',
                                                        '21 PM':'9 PM',
                                                        '22 PM':'10 PM',
                                                        '23 PM':'11 PM',
                                                        '24 PM':'12 PM'}"
                                                name="openTime"
                                                value="'8 AM'"
                                                cssStyle="width:145px;height:30px;font-size: 14px;font-weight: bold;"
                                                />
                                            To
                                            <s:select 
                                                list="#{'1 AM':'1 AM',
                                                        '2 AM':'2 AM',
                                                        '3 AM':'3 AM',
                                                        '4 AM':'4 AM',
                                                        '5 AM':'5 AM',
                                                        '6 AM':'6 AM',
                                                        '7 AM':'7 AM',
                                                        '8 AM':'8 AM',
                                                        '9 AM':'9 AM',
                                                        '10 AM':'10 AM',
                                                        '11 AM':'11 AM',
                                                        '12 AM':'12 AM',
                                                        '13 PM':'1 PM',
                                                        '14 PM':'2 PM',
                                                        '15 PM':'3 PM',
                                                        '16 PM':'4 PM',
                                                        '17 PM':'5 PM',
                                                        '18 PM':'6 PM',
                                                        '19 PM':'7 PM',
                                                        '20 PM':'8 PM',
                                                        '21 PM':'9 PM',
                                                        '22 PM':'10 PM',
                                                        '23 PM':'11 PM',
                                                        '24 PM':'12 PM'}"
                                                name="closeTime"
                                                value="'22 PM'"
                                                cssStyle="width:145px;height:30px;font-size: 14px;font-weight: bold;"
                                                />
                                        </td>
                                    </tr>
                                    <tr style="height: 50px;">
                                        <td style="width: 20%;text-align: right;">
                                            Descriptions
                                        </td>
                                        <td style="width: 70%;text-align: left; padding-left: 10px;">

                                            <s:textarea style="width: 300px;" name="descriptions">

                                            </s:textarea>
                                        </td>
                                    </tr>
                                    <tr style="height: 50px;">
                                        <td style="width: 20%;text-align: right;">

                                        </td>
                                        <td style="width: 70%;text-align: left; padding-left: 10px;">
                                            <s:if test="hasActionErrors()">
                                                <div class="errors">
                                                    <s:actionerror/>
                                                </div>
                                            </s:if>
                                            <s:if test="hasActionMessages()">
                                                <div class="welcome">
                                                    <s:actionmessage/>
                                                </div>
                                            </s:if>
                                        </td>
                                    </tr>
                                    <tr style="height: 50px;">
                                        <td style="width: 20%;text-align: right;">

                                        </td>
                                        <td style="width: 70%;text-align: left; padding-left: 10px;">

                                            <s:submit  cssClass="button-1" value="AddNew"></s:submit>
                                            </td>
                                        </tr>
                                    </table>
                            </s:form>

                        </div>
                    </article>
                </div>
            </div>
        </section>
        <!--==============================footer=================================-->
        <%@include file="footer.jsp" %>
        <script>
            function readURL(input) {
                if (input.files && input.files[0]) {
                    var reader = new FileReader();
                    reader.onload = function(e) {
                        $('#previewHolder').attr('src', e.target.result);
                    }

                    reader.readAsDataURL(input.files[0]);
                }
            }
            $("#filePhoto").change(function() {
                readURL(this);
            });

        </script>
    </body>
</html> 
